package com.xiaomaoguai.redis.sub2;

import java.io.Serializable;
import java.util.List;

/**
 * @fileName: WebSocketMessageModel.java
 * @author: WeiHui.Zhang
 * @date: 2016-07-27  11:22
 * @version: v1.0.0
 */
public class WebSocketMessageModel implements Serializable {

    private static final long serialVersionUID = -7743866652101170742L;

    /**
     * 消息接收人
     */
    private List<String> receivers;

    /**
     * 消息类型
     */
    private int type;

    /**
     * 推送数据
     */
    private Object data;

    /**
     * 构造方法
     */
    public WebSocketMessageModel() {
    }

    /**
     * 构造方法
     *
     * @param type 类型
     */
    public WebSocketMessageModel(int type) {
        this.type = type;
    }

    public List<String> getReceivers() {
        return receivers;
    }

    public void setReceivers(List<String> receivers) {
        this.receivers = receivers;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "WebSocketMessageModel{" +
                "receivers=" + receivers +
                ", type=" + type +
                ", data=" + data +
                '}';
    }
}
